#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#define SETBIT(num,k) (num &= (~(1<<(k-1))))
void ShowBit(int num)
{
	int i = 31;
	for (; i >= 0; i--)
	{
		if (num & (1 << i))
		{
			printf("1 ");
		}
		else
		{
			printf("0 ");
		}
	}
	printf("\n");
}
//int main()
//{
//	int num = -1;
//	int k = 0;
//	scanf("%d", &k);
//	//1111 1111 & 1111 1101
//	//0000 0001 -> 0000 0010 -> 1111 1101
//	ShowBit(num);
//	num &= (~(1 << (k - 1)));
//	ShowBit(num);
//	return 0;
//}
int main()
{
	int num = -1;
	int k = 0;
	scanf("%d", &k);
	ShowBit(num);
	SETBIT(num, k);
	ShowBit(num);
	return 0;
}